import {
	createStore,
	combineReducers,
	applyMiddleware,
	compose
} from 'redux';

import reducers from './reducers';
import thunk from 'redux-thunk';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

export default createStore(
	combineReducers(reducers), {
		trainNumber: "",
		departStation: "",
		arriveStation: "",
		seatType: "",
		departDate: Date.now(),
		arriveDate: Date.now(),
		departTimeStr: null,
		arriveTimeStr: null,
		durationStr: null,
		price: "",
		passengers: [],
		menu: null,
		isMenuVisible: false,
		searchParsed: false,
	},
	composeEnhancers(applyMiddleware(thunk))
);